<?php
$id = $_POST['id'];
$field = $_POST['field'];
$content = $_POST['content'];
include_once 'conn.php';
$sql = "update carinfo set $field = '$content' where id = $id";
$result = mysqli_query($conn,$sql);
if($result){
    $a['code'] = 200;
}
else{
    $a['code'] = -1;
    $a['sql'] = $sql;
    $a['error']=mysqli_error($conn);
    $a['msg'] = '更新数据表出错';
}
echo json_encode($a);
